package com.wxxymaker.edu.init;

import com.blade.ioc.annotation.Bean;
import com.blade.task.annotation.Schedule;
import com.wxxymaker.edu.utils.TokenUtils;

/**
 * @AUTHOR soft
 * @DATE 2018/9/5 0:01
 * @DESCRIBE 定时任务
 */
@Bean
public class ScheduleTask {

    /**
     * 定期清理过期的Token
     * 每5天清理一次
     */
    @Schedule(cron = "0 0 1 1/5 * ? *", name = "clearOverTimeToken")
    public void clearOverTimeToken() {
        TokenUtils.clearOverTimeToken();
    }
}
